package com.sys.dao;

import java.sql.SQLException;
import java.util.List;

import com.sys.domain.Upload;

public interface UploadDao {
	/**
	 * @Title: addupload 
	 * @Description: TODO(向File表中插入上传的文件信息) 
	 * @param file   封装后的file域
	 * @return Boolean
	 * @throws SQLException
	 */
	Boolean addUpload(Upload upload) throws SQLException;
	
	/**
	 * @Title: findAllSelfUpload 
	 * @Description: TODO(查找某用户上传的文件) 
	 * @param  userId
	 * @return List<Upload>
	 * @throws SQLException
	 */
	List<Upload> findAllSelfUpload(String userId) throws SQLException;
	
	/**
	 * @Title: deleteRecord 
	 * @Description: TODO(删除记录和文件) 
	 * @param @param fileId
	 * @return Boolean
	 * @throws SQLException
	 */
	Boolean deleteRecord(String fileId) throws SQLException;
	
	/**
	 * @Title: isFileHasUpload 
	 * @Description: TODO(文件上传是否成功) 
	 * @param @param fileName
	 * @return Boolean
	 * @throws SQLException
	 */
	Boolean isFileHasUpload(String fileName) throws SQLException;
	
	/**
	 * @Title: findAllNotAppro 
	 * @Description: TODO(查找所有未审批的文件) 
	 * @return List<Upload>
	 * @throws SQLException
	 */
	List<Upload> findAllNotAppro() throws SQLException;
	
	/**
	 * @Title: changeStatus 
	 * @Description: TODO(修改upload表中问价的状态) 
	 * @param fileId statu
	 * @return Boolean
	 * @throws SQLException
	 */
	Boolean changeStatus(String fileId, String status) throws SQLException;
	
	/**
	 * @Title: getAllInfoByFileId 
	 * @Description: TODO(通过文件Id获得文件全部信息) 
	 * @param fileId
	 * @return Upload
	 * @throws SQLException
	 */
	Upload getAllInfoByFileId(String fileId) throws SQLException;
}
